<template>
  <div>
    <el-form ref="form" :model="form" label-width="80px">
      <el-form-item label="用户昵称">
        <el-input v-model="form.name" style="width: 50%" />
      </el-form-item>
      <el-form-item label="默认地址">
        <el-select v-model="form.region" placeholder="请选择默认地址">
          <el-option label="学校" value="shanghai" />
          <el-option label="家里" value="beijing" />
        </el-select>
      </el-form-item>
      <el-form-item label="默认支付">
        <el-checkbox-group v-model="form.type">
          <el-checkbox label="支付宝" name="type" />
          <el-checkbox label="微信" name="type" />
          <el-checkbox label="银行卡" name="type" />
        </el-checkbox-group>
      </el-form-item>
      <el-form-item label="登入号码">
        <el-input v-model="form.phone" type="text" style="width: 50%" />
        <el-button type="text">修改密码</el-button>
      </el-form-item>
      <el-form-item label="个人简介">
        <el-input v-model="form.desc" style="width: 80%" type="textarea" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">更新</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
        name: '沈宇帆',
        region: '',
        date1: '',
        date2: '',
        delivery: false,
        type: [],
        resource: '',
        desc: '',
        phone: '19857116321'
      }
    }
  },
  methods: {
    onSubmit() {
      console.log('更新')
    }
  }
}
</script>

<style>

</style>
